package edu.gznu.ics.fast.pulsar.service.prestoacc.picService.impl;

import edu.gznu.ics.fast.pulsar.dao.prestoacc.knowPulsar.KnownPulsarCandidateMapper;
import edu.gznu.ics.fast.pulsar.dao.prestoacc.pic.PicInfoMapper;
import edu.gznu.ics.fast.pulsar.model.po.prestoacc.pic.PicInfoPO;
import edu.gznu.ics.fast.pulsar.service.prestoacc.picService.ModifyPicParaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by fei-zyx on 2016/10/19.
 */
@Service("setPicParaService")
public class ModifyPicParaServiceImply implements ModifyPicParaService {
    @Autowired
    KnownPulsarCandidateMapper knownPulsarCandidateMapper;
    @Autowired
    PicInfoMapper picInfoMapper;

    @Override
    public boolean setPicPara(String knownPulsarCandidateId) {
        knownPulsarCandidateMapper.updatePicFlag2BynownPulsarId(knownPulsarCandidateId);
        return false;
    }

    @Override
    public boolean noSetPicPara(String knownPulsarCandidateId) {
        knownPulsarCandidateMapper.updatePicNoFlag2BynownPulsarId(knownPulsarCandidateId);
        return false;
    }

    @Override
    public void setPicInfoAsKnown(PicInfoPO pic) {
        picInfoMapper.updateNoteAsAPulsar(pic);

    }

    @Override
    public void setPicAsNotPulsar(PicInfoPO pic) {
        picInfoMapper.updateNoteAsNoPulsar(pic);
    }
}
